<?php
include('wp-blog-header.php');
date_default_timezone_set ('Asia/Kolkata');
echo date('d M,Y')."<br />";


$offers = new Pod('deal');
$offers->page = 1;
$offers->search = false;
$where = "t.camp_end > ".fix_date();
$offers->findRecords('id DESC', -1, $where);
$total_offers = $offers->getTotalRows()." Active Offers";
  
$brand = new Pod('brand');
$brand->page = 1;
$brand->search = false;
$where = "campaigns.camp_end > ".fix_date();
$brand->findRecords('id DESC', -1, $where);
$total_brands = $brand->getTotalRows()." Stores";
  
$op.= '<div class="total_offers">';
$op.= $total_offers.' from '.$total_brands;
$op.= '</div>';
echo $op;



$user_pod = new Pod('users');
$user_pod->findRecords('id DESC', -1);
echo 'Total Buzzr Members: '.$user_pod->getTotalRows()."<br />";

$newsletter_pod = new Pod('newsletter');

$newsletter_pod->findRecords('id DESC', -1,"t.weekly = 1");
echo 'Weekly Newsltter Members: '.$newsletter_pod->getTotalRows()."<br />";

$newsletter_pod->findRecords('id DESC', -1,"t.daily = 1");
echo 'Daily Newsletter Subscribers: '.$newsletter_pod->getTotalRows()."<br />";

$newsletter_pod->findRecords('id DESC', -1,"t.daily = 1 && cities.name = 'Ahmedabad'");
echo 'Ahmedabad: '.$newsletter_pod->getTotalRows()."<br />";

$newsletter_pod->findRecords('id DESC', -1,"t.daily = 1 && cities.name = 'Bengaluru'");
echo 'Bengaluru: '.$newsletter_pod->getTotalRows()."<br />";

$newsletter_pod->findRecords('id DESC', -1,"t.daily = 1 && cities.name = 'Chandigarh'");
echo 'Chandigarh: '.$newsletter_pod->getTotalRows()."<br />";

$newsletter_pod->findRecords('id DESC', -1,"t.daily = 1 && cities.name = 'Chennai'");
echo 'Chennai: '.$newsletter_pod->getTotalRows()."<br />";

$newsletter_pod->findRecords('id DESC', -1,"t.daily = 1 && cities.name = 'Coimbatore'");
echo 'Coimbatore: '.$newsletter_pod->getTotalRows()."<br />";

$newsletter_pod->findRecords('id DESC', -1,"t.daily = 1 && cities.name = 'Delhi'");
echo 'Delhi: '.$newsletter_pod->getTotalRows()."<br />";

$newsletter_pod->findRecords('id DESC', -1,"t.daily = 1 && cities.name = 'Goa'");
echo 'Goa: '.$newsletter_pod->getTotalRows()."<br />";

$newsletter_pod->findRecords('id DESC', -1,"t.daily = 1 && cities.name = 'Hyderabad'");
echo 'Hyderabad: '.$newsletter_pod->getTotalRows()."<br />";

$newsletter_pod->findRecords('id DESC', -1,"t.daily = 1 && cities.name = 'Indore'");
echo 'Indore: '.$newsletter_pod->getTotalRows()."<br />";

$newsletter_pod->findRecords('id DESC', -1,"t.daily = 1 && cities.name = 'Jaipur'");
echo 'Jaipur: '.$newsletter_pod->getTotalRows()."<br />";

$newsletter_pod->findRecords('id DESC', -1,"t.daily = 1 && cities.name = 'Kolkata'");
echo 'Kolkata: '.$newsletter_pod->getTotalRows()."<br />";

$newsletter_pod->findRecords('id DESC', -1,"t.daily = 1 && cities.name = 'Lucknow'");
echo 'Lucknow: '.$newsletter_pod->getTotalRows()."<br />";

$newsletter_pod->findRecords('id DESC', -1,"t.daily = 1 && cities.name = 'Mumbai'");
echo 'Mumbai: '.$newsletter_pod->getTotalRows()."<br />";

$newsletter_pod->findRecords('id DESC', -1,"t.daily = 1 && cities.name = 'Nagpur'");
echo 'Nagpur: '.$newsletter_pod->getTotalRows()."<br />";

$newsletter_pod->findRecords('id DESC', -1,"t.daily = 1 && cities.name = 'Pune'");
echo 'Pune: '.$newsletter_pod->getTotalRows()."<br />";

$newsletter_pod->findRecords('id DESC', -1,"t.daily = 1 && cities.name = 'Surat'");
echo 'Surat: '.$newsletter_pod->getTotalRows()."<br />";
?>